package sharewithus.analyzer.utils;

import gnu.trove.list.TLinkable;

public class MatchRet<D> implements TLinkable<MatchRet<D>>{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2170681971499942265L;
	private int nextPoint;// 匹配词的结束位置
	private String term;
	private D data;
	private MatchRet<D> previous;
	private MatchRet<D> next;
	
	public MatchRet(int e, String m, D d) {
		nextPoint = e;
		term = m;
		data = d;
	}
	
	public int getNextPoint() {
		return nextPoint;
	}

	public void setNextPoint(int nextPoint) {
		this.nextPoint = nextPoint;
	}

	public String getTerm() {
		return term;
	}

	public void setTerm(String term) {
		this.term = term;
	}

	public D getData() {
		return data;
	}

	public void setData(D data) {
		this.data = data;
	}

	public String toString() {
		return "nextPosition:" + nextPoint + " posInf:" + data;
	}

	public MatchRet<D> getNext() {
		return next;
	}

	public MatchRet<D> getPrevious() {
		return previous;
	}

	public void setNext(MatchRet<D> next) {
		this.next = next;
	}

	public void setPrevious(MatchRet<D> previous) {
		this.previous = previous;
	}
}
